package com.MyDemo.demo.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.MyDemo.demo.interceptor.TestInterceptor;

/**
 * 拦截器配置
 */
@Configuration
public class WebConfiguration implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new TestInterceptor())
                .excludePathPatterns("/login", "/wt/login", "/swagger-ui/**", "/swagger-ui.html", "/v3/api-docs/**");
    }
}